Directory:
[C # tips] C # some confusing concepts -------- data type storage location, method call, out and ref Parameters
[C # tips] C # some confusing concepts (ii) -------- constructor, this keyword, partial classification, enumeration [C #
Introduction and Application of abstract keywords in PHP abstract methods and abstract classes, abstract keywords
PHP abstract methods and abstract keywordsAbstract keywords are used to define abstract methods and abstract classes.
Abstract
Reprinted from http://hi.baidu.com/sjjqaa2010/blog/item/963bd13e0cdcadf33c6d974a.html
I. abstract classes
(1) abstract methods are declared only, but do not contain implementations. They can be considered as virtual methods without
This article introduces the object-oriented abstract methods in PHP and the use of abstract class __call cloning objects, and friends who need to be able to learn.
Abstract methods and abstract classes
In the OOP language, a class can have one or
Abstract classes are similar to interfaces, and are very special classes. An abstract class is a special class, and an interface is a special kind of abstract class. They are typically used in conjunction with object-oriented polymorphism. While it
Abstract methods and abstract classesIn OOP, a class can have one or more sub-classes, and each class has at least one public method as an external code to access its interface. Abstract methods are introduced to facilitate Inheritance. Let's take a
1. Terminating class and terminating methodClasses and methods that are decorated with the final modifier, the terminating class cannot be inherited, and the finalization method cannot be overridden by subclasses of the current classCharacteristics
Abstract class _ interface _ polymorphism Abstract keywords indicate Abstract classes. They can modify a class or method. If it is used to modify a class, this class is an abstract class. If it is used to modify a method, this method is an abstract
1. Final keywords
Final keywords can be used to modify classes, methods, and member variables.
(1) classes marked by final cannot be inherited;
(2) The final flag method cannot be subscribe;
(3) variables marked by final become constants and can
Abstract classes, abstract methods, and interfaces of PHP, and abstract interfaces of php
Abstract classes and abstract methods in PHP are not used much by themselves, but they are often used by others in projects. Similarly, today, when reading
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.